# vim:ft=python:

# Script wsgi para mod wsgi en Apache 2.

import os, sys

apache_configuration= os.path.dirname(__file__)
project = os.path.dirname(apache_configuration)
workspace = os.path.dirname(project)
if workspace not in sys.path:
    sys.path.append(workspace) 

#path = os.path.realpath(__file__)[:-29]
#if path not in sys.path:
#    sys.path.append(path)

os.environ['DJANGO_SETTINGS_MODULE'] = 'congreso.settings'

import django.core.handlers.wsgi

#application = django.core.handlers.wsgi.WSGIHandler()
_application = django.core.handlers.wsgi.WSGIHandler()

def application(environ, start_response):
    environ['PATH_INFO'] = environ['SCRIPT_NAME'] + environ['PATH_INFO']
    return _application(environ, start_response)

